package excelgo

import "time"

func dateStandardStr(t string) time.Time {
	layout := "2006-01-02"
	if t == "" {
		return time.Time{}
	}
	parse, err := time.Parse(layout, t)
	if err != nil {
		return time.Time{}
	}
	return parse
}

func strStandardTime(t string) time.Time {
	layout := "2006-01-02 15:04:05"
	parse, err := time.Parse(layout, t)
	if err != nil {
		return time.Now()
	}
	return parse
}

func timeStandardStr(t time.Time) string {
	layout := "2006-01-02 15:04:05"
	return t.Format(layout)
}
